package com.example.view.mvp;

import android.os.Handler;

import androidx.lifecycle.Lifecycle;
import androidx.lifecycle.OnLifecycleEvent;

import com.example.common.vp.BasePresenter;
import com.example.view.mvp.bean.TestRankingBean;

public class HomePresenter extends BasePresenter<HomeContract.View> implements HomeContract.Presenter  {

    @Override
    public void getHomeData() {

    }


    @OnLifecycleEvent(Lifecycle.Event.ON_CREATE)
    @Override
    public void getTestData() {
        TestRankingBean data = new TestRankingBean();
        data.setMsg("msgsssss");
        data.setState("1");
        mView.showDialog("msg");
        new Handler().postDelayed(new Runnable() {
            @Override
            public void run() {
                mView.showHomeData(data);
                mView.dismissDialog();
            }
        }, 3000);

    }
}
